//
//  Model.h
//  ipersist
//
//  Created by Dan Lorenc on 4/13/09.
//  Copyright 2009 MIT. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface Model : NSObject {
	int dbid;
	NSMutableDictionary *data;
	NSUserDefaults *defaults;
}

@property(nonatomic) int dbid;
@property(nonatomic, retain) NSMutableDictionary *data;
@property(nonatomic, retain) NSUserDefaults *defaults;

-(void)save;
-(id)init;
-(void)remove;

+(void)createTable;
+(void)flushTable;
+(void)deleteTable;
+(NSMutableArray *)objects;
+(NSMutableArray *)filterObjects:(NSMutableArray *)objects key:(id)key equalsValue:(id)value;
+(NSMutableArray *)filterObjects:(NSMutableArray *)objects key:(id)key lessThanValue:(id)value;
+(NSMutableArray *)filterObjects:(NSMutableArray *)objects key:(id)key greaterThanValue:(id)value;


@end
